home *** CD-ROM | disk | FTP | other *** search
- 10 July 90
- TURBO PASCAL MODULATING PRINTING UTILITY
-
- The Turbo Pascal Printing Utility is designed to improve the readability
- and usefulness of printed Turbo Pascal (TP) source code. This is done
- by utilizing the printing commands available on most dot matrix printers
- commonly used with PC's. The source code file is not affected in any way,
- although an additional file may be created, stripped of comments, if you
- choose. The program may be run from a command line or you may be prompted
- by the program. Printing output is through the lpt1 parallel port.
- To properly use this printing filter (TPMPU), a few guidelines must be fol-
- lowed in writing source code. These guidelines will be highlighted as the
- operation of TPMPU is outlined below. TPMPU assumes normal pascal syntax.
-
- Using the Command Line Input With Switches ("/"):
- After typing TPMPU's filename, you may list the filename to be processed
- with any necessary path preceeding it in dos format. If the filename excludes
- a period and extension, ".pas" will be assumed. Other parameters may be
- added as desired, separated by spaces (or tabs). To change a later parameter,
- the earlier ones must be listed. The parameter order is:
- a)path with filename
- b)printer number (default to Epson FX="1")
- choices: 1: Epson FX
- 2: Epson MX
- 3: IBM Proprinter
- 4: Panasonic 1080/1090...
- 5: Okidata 192/193
-
- c)create comment stripped file (default is no creation="0")
- choices: 0: no creation
- 1: delete (* *)
- 2: delete { }
- 3: delete both
-
- d)modify global var before main program (default is yes="1")
- choices: 0: no printing modification
- 1: printing modification
-
- Set your printer to "top of form" before starting TPMPU.
-
- Example: prntpas /b:\pascal\testprog /3 /0 /1
- TPMPU's executable filename is prntpas, it is located on drive "b" in sub-
- directory "pascal\". The program to print is testprog (.pas) and is to be
- printed with printer type #3. No comment stripped file is created and global
- variables are modified throughtout the source code.
-
- Using Prompt Input:
- To become familiar with TPMPU, just type its filename, it will ask you
- for inputs, displaying values to be used on the command line when desired.
- Set your printer to "top of form" before entering printer type.
- If TPMPU can't find source code file, you will be reprompted for input.
-
- TPMPU Operation:
- After getting preliminary information from the user, through a command line
- or by prompting, the pascal source code file is retrieved and the printer is
- initialized. Printing is started with a heading of the current date/time.Then
- the filename is printed with its directory listing of date/time.
- The key word "PROGRAM" or "UNIT" (all upper case) is searched for in the
- first 50 lines of text. If found, the phrase after it will be printed with
- emphasis. If the program is a pascal unit, then you will be prompted for
- whether You want to mark all procedures/functions or just external ones.
- TPMPU next starts processing the code for procedure and function
- names, until the body of the main program begins. The comment {main program}
- or {MAIN PROGRAM} should be written at the "begin" of the main program. If
- the source code is a pascal unit, then place this comment on the line with
- "implementation".
- Note there is only one space between the comment brackets and that is between
- the two words.
-
- ***********INCLUDE "{MAIN PROGRAM}" or "{main program}" at***********
- *********BEGIN of the MAIN PROGRAM BODY************
- ********or if a PASCAL UNIT, at "IMPLEMENTATION"*********
-
- All procedure/function declarations must start with the upper case word
- "PROCEDURE" or "FUNCTION".
-
- *********USE "PROCEDURE" or "FUNCTION" in DECLARING THEM**********
-
- After collecting these identifiers, the program starts from the begin-
- ning to print the source code, emphasizing+underlining the procedure/
- function names. The index number of the name will be printed as a com-
- ment on the right edge.It also looks for variables local to these pro-
- cedures/functions. The printing of these variables are modulated (us-
- ually italics) in the body of the procedure/function they exist in.
- In the declaration of them, there must be the word "var" or "Var" on
- a separate line (comments excepted) before any local variables are listed.
-
- ********DECLARE LOCAL VARIABLES WITH "Var" or "var" on a***********
- *********SEPARATE LINE BEFORE LISTING IDENTIFIERS***********
-
- Global variables must be declared with the word "VAR" on a separate line
- (comments excepted) before any variables are listed.
-
- ********DECLARE GLOBAL VARIABLES WITH "VAR" on a***********
- *********SEPARATE LINE BEFORE LISTING IDENTIFIERS***********
-
- Global variables will be printed in double strike form in the main program.
- If you choose, they will not be highlighted in the procedures and functions
- (the default is to highlight them throughout the source code).
-
- TPMPU will keep a tally of "begin" and "end" on the right margin, looking
- for the words "begin", "Begin", "BEGIN", "end", "End", and "END". By tallying
- with "begins" adding and "ends" substracting from an index, you can more
- easily decipher the compound sentence logic in your code. All procedures/
- functions should begin/end with an index of one.
-
- ********USE LOWER ONLY, UPPER ONLY, or FIRST LETTER ONLY********
- *******UPPER CASE for "BEGIN" and "END"********
-
- Special case on tallying begins and ends:
- A few TP words have implicit "begin" and an explicit "end". Tallying is
- done as if both were explicit. When using the "case of" statement, both
- these words must be written on the same line for TPMPU to sense an implicit
- "begin".
- *******"Case of" must appear on the same line********
-
- After printing the source code, TPMPU will print a listing of procedures
- and functions detected in source code with index numbers. If the code
- is written with only uppercase "procedure" and "function" in declar-
- ations, then you can use the find-string feature of TP and the index numbers
- of this listing to easily move about your code while working in TP editor.
-
- TPMPU will compress printing of comments, of type "{ }" and "(* *)". The
- former will be printed at 12 or 15 cpi if your printer supports this (other-
- wise it will be printed at 17 cpi). The latter will be printed at 17 cpi.
- You may request that a source code disk file be created of your code strip-
- ped of one or both of these code forms. Using "(* *)" for your skipped code
- and "{ }" for programmer comments will enable you to conveniently strip off
- one and retain the other. If you have special 'in-house' comments, they
- may be enclosed in "(* *)" and stripped off with the code before the
- code is 'released'.
-
- To clarify TPMPU's operation, a short "nonsense" pascal program is included
- to print using TPMPU.
-
- Errors:
- a) If more procedures & functions are detected than can be listed, a
- comment will be displayed. You will be prompted to print the code anyway
- or quit.
- b) If there seems to be an error in the "begin-end" count, this will be
- displayed. Typically this happens when a procedure/function does not start
- with a count of 1.
- NOTE:In processing pascal units, because "implementation" has an
- implicit "begin", procedure/functions will start with a count of 2.
- To avoid erroneous error comments, you can write "implementation" to
- avoid detection (ex. implementatioN, ImplementatioN).
-
- Registration:
-
- You are free to use TPMPU for up to a month before you should register.
- You are free to make copies and distribute it in combination with accompanying
- documentation.
-
- The cost is $15 plus $1 for shipping.
-
- By registering, you will receive:
-
- a) The current updated version of TPMPU plus information on constructing
- your personalized printer command files for use by TPMPU. To help you
- work out command files for your printer, to produce personally tailored
- printing results, a test program (with source code) will be included.
- For convenience, you may request the default printer type be other than
- Epson FX.
-
- b) For the registered program, the max # of procedures and functions that
- may be detected is = 80. (The unregistered program is 20.) If desired, you
- may request another max value.
-
- c) A second updated version will have a default to printer type "8", for
- use with an external CMD file.
-
- d) Both updated, registered versions of TPMPU will include the provision to
- divert the modulated printing text to a disk file. Diverting the printing
- text will greatly speed up the program's operation and enable you to use
- "print.com" in DOS, a crude but functional 'time-share' utility. As you
- probably know by now, printing a long text file on a dot matrix printer can
- take a while. Since the running time for TPMPU is limited by how fast your
- printer can print output, putting the output to a disk file makes TPMPU
- run much faster. By using "print" in DOS, you can get your printed output
- of modulated source code while doing other work on your PC.
-
- e) Registered versions of TPMPU include a provision to print out only
- the procedure/function table with indices. I often use this table to
- maneuver around a large source code program with the help of "search" in
- the TP editor.
-
- f) As a registered owner you also have the privilege of receiving program
- support. I can be reached at the address below.
-
- g) As a registered owner, you may request modifications to TPMPU to meet
- special needs and styles. The cost for such modifications naturally depends
- on how much reworking is necessary. In replying to such requests, I will
- state the cost and time estimate for doing the modifications.
-
- My address for registration and support is:
-
- Dennis DiBart
- 747 Elm St.
- El Cerrito, Ca. 94530
-
-
-
- ----------------end-of-author's-documentation---------------
-
- Software Library Information:
-
- This disk copy provided as a service of
-
- Public (software) Library
-
- We are not the authors of this program, nor are we associated
- with the author in any way other than as a distributor of the
- program in accordance with the author's terms of distribution.
-
- Please direct shareware payments and specific questions about
- this program to the author of the program, whose name appears
- elsewhere in this documentation. If you have trouble getting
- in touch with the author, we will do whatever we can to help
- you with your questions. All programs have been tested and do
- run. To report problems, please use the form that is in the
- file PROBLEM.DOC on many of our disks or in other written for-
- mat with screen printouts, if possible. PsL cannot debug pro-
- programs over the telephone, though we can answer questions.
-
- Disks in the PsL are updated monthly, so if you did not get
- this disk directly from the PsL, you should be aware that the
- files in this set may no longer be the current versions. Also,
- if you got this disk from another vendor and are having prob-
- lems, be aware that some files may have become corrupted or
- lost by that vendor. Get a current, working disk from PsL.
-
- For a copy of the latest monthly software library newsletter
- and a list of the 2,000+ disks in the library, call or write
-
- Public (software) Library
- P.O.Box 35705 - F
- Houston, TX 77235-5705
-
- 1-800-2424-PSL
- MC/Visa/AmEx
-
- Outside of U.S. or in Texas
- or for general information,
- Call 1-713-524-6394
-
- PsL also has an outstanding
- catalog for the Macintosh.
-